import { TextWidget } from '@inbiz/react';
import '../../../style.less';

function List(props) {
  const { list, outId, appClick } = props;

  return (
    <ul>
      {list &&
        list.map((item) => (
          <li
            key={item?.OutId}
            onClick={() => appClick(item?.OutId)}
            className={item?.OutId == outId ? 'active' : ''}
          >
            {item?.SiteType === 0 && <TextWidget>Permission.webApplication</TextWidget>}
            {item?.SiteType === 1 && <TextWidget>Permission.mobileApplication</TextWidget>}
            {item?.SiteType === 2 && <TextWidget>Permission.managementApplication</TextWidget>}
          </li>
        ))}
    </ul>
  );
}

export default List;
